﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for EPhieuNhap
/// </summary>
public class EPhieuNhap
{
    private int maPN;
    private DateTime ngayNhap;
    private int maNCC;
    private int maNV;
    private bool trangThai;
    public EPhieuNhap()
    { }
    public EPhieuNhap(int maPN, DateTime ngayNhap, int maNCC, int maNV, bool trangThai)
    {
        this.maPN = maPN;
        this.ngayNhap = ngayNhap;
        this.maNCC = maNCC;
        this.maNV = maNV;
        this.trangThai = trangThai;
    }
    public int MaPN
    {
        get { return this.maPN; }
        set
        {
            if (value == null)
                throw new Exception("maPN not allow nullvalue.");
            this.maPN = value;
        }
    }
    public bool TrangThai
    {
        get { return trangThai; }
        set { trangThai = value; }
    }
    public DateTime NgayNhap
    {
        get { return this.ngayNhap; }
        set
        {
            if (value == null)
                throw new Exception("ngayNhap not allow nullvalue.");
            this.ngayNhap = value;
        }
    }
    public int MaNCC
    {
        get { return this.maNCC; }
        set
        {
            if (value == null)
                throw new Exception("maNCC not allow nullvalue.");
            this.maNCC = value;
        }
    }
    public int MaNV
    {
        get { return this.maNV; }
        set
        {
            if (value == null)
                throw new Exception("maNV not allow nullvalue.");
            this.maNV = value;
        }
    }
    public override string ToString()
    {
        return this.maPN + "; " + this.ngayNhap + "; " + this.maNCC + "; " + this.maNV + "; ";
    }
    public override bool Equals(Object obj)
    {
        EPhieuNhap me = (EPhieuNhap)obj;
        bool ret = this.MaPN.Equals(me.MaPN);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaPN.GetHashCode();
    }

}